<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2021/11/22
  Time: 16:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath();%>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <title>密码修改</title>
    <link rel="stylesheet" type="text/css" href="<%=path %>/web/app/css/publice.css"/>
    <link rel="stylesheet" type="text/css" href="<%=path %>/web/app/css/style.css"/>
    <link rel="stylesheet" href="<%=path %>/web/app/css/swiper.min.css">
    <script src="<%=path %>/web/app/js/jquery-1.10.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        fnResize();
        var evt = "onorientationchange" in window ? "orientationchange" : "resize";
        window.addEventListener("resize", function() {
            fnResize()
        }, false);
        function fnResize(){
            var docWidth = document.documentElement.clientWidth,
                body = document.getElementsByTagName('html')[0];
            if(docWidth >= 750) docWidth = 749;
            body.style.fontSize = docWidth / 20 + 'px';
        }
    </script>
    <script src="<%=path %>/web/app/js/swiper.min.js"></script>
    <script type="text/javascript" src="<%=path %>/web/app/js/style.js" ></script>

    <script type="text/javascript">
        function check_Form(){
            var oldpwd = document.getElementById("oldpwd").value;//旧密码
            var newpwd = document.getElementById("newpwd").value;//新密码
            var prepwd = document.getElementById("prepwd").value;//密码确认

            if(oldpwd==""){
                alert("原密码不能为空！请检查！");
                return false;
            }
            if(newpwd==""){
                alert("新密码不能为空！请检查！");
                return false;
            }
            if(newpwd!=prepwd){
                alert("两次密码不一致！请检查！");
                return false;
            }
        }

        function check_msg(){
            var msg = '${b }';
            if(msg=="true"){
                alert("修改成功! 请使用新密码重新登录！");
                window.location.href = "app_login";
            }
            if(msg=="false"){
                alert("程序运行失败，请检查！如多次尝试失败，请于客服联系！");
            }
            if(msg=="oldpwd_error"){
                alert("原密码不正确！请检查！");
            }
        }

    </script>



</head>
<body onload="check_msg()">
<div class="ts-wrap" style="background-color: white;">
    <form action="center_mmxg_update" method="post" onsubmit="return check_Form()" enctype="multipart/form-data">
        <div class="apply_con" style="background-color: white;">


            <table style="text-align: center;" width="100%">

                <tr>
                    <td style="text-align: left;width: 100px;font-size: 20px;" colspan="1">
                        <a href="/MyApp">《返回</a>
                    </td>
                    <td style="text-align: center;" colspan="1">
                        <strong style="font-size: 30px;">密 码 修 改</strong>
                    </td>
                </tr>



                <tr>
                    <td style="text-align: right;">
                        <strong style="color: #2D93CA;font-size: 18px;">原密码：</strong>
                    </td>
                    <td>
                        <input type="password"   class="text" name="oldpwd"  id="oldpwd" style="width: 300px;background-color: #F2F2F2;"/>
                    </td>
                </tr>

                <tr>
                    <td style="text-align: right;">
                        <strong style="color: #2D93CA;font-size: 18px;">新密码：</strong>
                    </td>
                    <td>
                        <input type="password"   class="text" name="newpwd"  id="newpwd" style="width: 300px;background-color: #F2F2F2;"/>
                    </td>
                </tr>

                <tr>
                    <td style="text-align: right;">
                        <strong style="color: #2D93CA;font-size: 18px;">密码确认：</strong>
                    </td>
                    <td>
                        <input type="password"   class="text" name="prepwd"  id="prepwd" style="width: 300px;background-color: #F2F2F2;"/>
                    </td>
                </tr>

            </table>






            <input type="submit" value="信息修改" class="testK text" />

        </div>
    </form>
    <!--固定底部 S-->
    <jsp:include page="/footer" ></jsp:include>
    <!--固定底部 E-->
</div>
</body>
</html>


